
public class Homework3 {

	public static void main(String[] args) {
		int[] nums = new int[10];
		int max, min;
		max = min = 0;
		for (int i = 0; i < nums.length; i++) {
			min = nums[0];
			max = nums[0];
			nums[i] = (int) (100 * Math.random());
			System.out.print(nums[i] + "\t");
			for (int j = 0; j < nums.length; j++) {

				if (nums[j] > max) {
					max = nums[j];
				}
				if (nums[j] < min) {
					min = nums[j];
				}
			}
		}

		System.out.println("\nmax=" + max + "\t" + "min=" + min);

	}

}
